window.onload = function () {
    var navSwiper = new Swiper('#swiper_tab', {
        freeMode: true,
        slidesPerView: 'auto',
        freeModeSticky: true,
    });
    var tabsSwiper = new Swiper('#swiper_container', {
        speed: 500,
        onTransitionStart: function (swiper) {
            $(".swiper_tab .active").removeClass('active');
            $(".swiper_tab li").eq(swiper.activeIndex).addClass('active');
        }
    })
    $(".swiper_tab li").on('click', function (e) {
        e.preventDefault()
        $(".swiper_tab .active").removeClass('active')
        $(this).addClass('active')
        tabsSwiper.slideTo($(this).index())
    })
}